//-----------------------------------------------------------------------
// <copyright file="a_ProductService.cs" company="AACECOM">
//     Copyright (c) AACECOM. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------

using System;
using System.Collections;
using ThoiTrang.Entities;
using ThoiTrang.Data;
    
namespace ThoiTrang.Business
{   
	/// <summary>
	/// 
	/// </summary> 
    public class a_ProductService
    {
        #region a_Product

        public static void Createa_Product(a_Product a_Product)
        {            
            try
            {
                a_ProductDAO a_ProductDAO = new a_ProductDAO();
                a_ProductDAO.Createa_Product(a_Product);
            }            
            catch (Exception ex)
            {                
                throw ex;
            }
        }        

        public static void Updatea_Product(a_Product a_Product)
        {            
            try
            {
                a_ProductDAO a_ProductDAO = new a_ProductDAO();
                a_ProductDAO.Updatea_Product(a_Product);
            }           
            catch (Exception ex)
            {
                throw ex;
            }
        }        

        public static void Deletea_Product(int prodID)
        {            
            try
            {
                a_ProductDAO a_ProductDAO = new a_ProductDAO();
                a_ProductDAO.Deletea_Product(prodID);
            }            
            catch (Exception ex)
            {
                throw ex;
            }
        }
        
        public static a_Product Geta_Product(int prodID)
        {            
            try
            {
                a_ProductDAO a_ProductDAO = new a_ProductDAO();
                return a_ProductDAO.Geta_Product(prodID);                
            }            
            catch (Exception ex)
            {
                throw ex;
            }
        }                

        public static a_ProductCollection Geta_ProductList(a_ProductColumns orderBy, OrderDirection orderDirection)
        {            
            try
            {
                a_ProductDAO a_ProductDAO = new a_ProductDAO();
                return a_ProductDAO.Geta_ProductList(orderBy, orderDirection);
            }            
            catch (Exception ex)
            {
               throw ex;
            }
        }        

        public static a_ProductCollection Geta_ProductList(a_ProductColumns orderBy, OrderDirection orderDirection, int page, int pageSize, out int totalRecords)
        {            
            try
            {
                a_ProductDAO a_ProductDAO = new a_ProductDAO();
                return a_ProductDAO.Geta_ProductList(orderBy, orderDirection, page, pageSize, out totalRecords);
            }            
            catch (Exception ex)
            {
                throw ex;
            }
        }        

        #endregion
    }
}